package com.project.frame.common.runner;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * desc
 *
 * @author lw007
 * @date 2021/12/21
 */
@Component
public class MyApplicationRunner implements ApplicationRunner {
    @Value("${server.port:80}")
    private int port;
    @Value("${server.servlet.context-path:/}")
    private String path;

    @Override
    public void run(ApplicationArguments applicationArguments) {
        System.out.println("访问地址：http://localhost:" + port+path);
    }
}
